package com.ruoyi.shop.service.impl;

import java.util.List;

import com.ruoyi.shop.domain.Category;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.shop.mapper.ShopMapper;
import com.ruoyi.shop.domain.Shop;
import com.ruoyi.shop.service.IShopService;

/**
 * 店铺入驻Service业务层处理
 *
 * @author ruoyi
 * @date 2024-11-26
 */
@Service
public class ShopServiceImpl implements IShopService
{
    @Autowired
    private ShopMapper shopMapper;

    /**
     * 查询店铺入驻
     *
     * @param shopId 店铺入驻主键
     * @return 店铺入驻
     */
    @Override
    public Shop selectShopByShopId(Long shopId)
    {
        return shopMapper.selectShopByShopId(shopId);
    }

    /**
     * 查询店铺入驻列表
     *
     * @param shop 店铺入驻
     * @return 店铺入驻
     */
    @Override
    public List<Shop> selectShopList(Shop shop)
    {
        return shopMapper.selectShopList(shop);
    }

    /**
     * 新增店铺入驻
     *
     * @param shop 店铺入驻
     * @return 结果
     */
    @Override
    public int insertShop(Shop shop)
    {
        return shopMapper.insertShop(shop);
    }

    /**
     * 修改店铺入驻
     *
     * @param shop 店铺入驻
     * @return 结果
     */
    @Override
    public int updateShop(Shop shop)
    {
        return shopMapper.updateShop(shop);
    }

    /**
     * 批量删除店铺入驻
     *
     * @param shopIds 需要删除的店铺入驻主键
     * @return 结果
     */
    @Override
    public int deleteShopByShopIds(Long[] shopIds)
    {
        return shopMapper.deleteShopByShopIds(shopIds);
    }

    /**
     * 删除店铺入驻信息
     *
     * @param shopId 店铺入驻主键
     * @return 结果
     */
    @Override
    public int deleteShopByShopId(Long shopId)
    {
        return shopMapper.deleteShopByShopId(shopId);
    }

    @Override
    public List<Category> categoryList() {
        return shopMapper.categoryList();
    }
}
